//
//  ViewController.m
//  PointTextField
//
//  Created by 内蒙小猿 on 2018/5/3.
//  Copyright © 2018年 zhaozhongpeng. All rights reserved.
//

#import "ViewController.h"
#import "HTPaymentMainSendCodeView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.view.backgroundColor = [UIColor cyanColor];
    self.view.translatesAutoresizingMaskIntoConstraints = NO;
    HTPaymentMainSendCodeView *sendCodeView = [[HTPaymentMainSendCodeView alloc] init];
    [self.view addSubview:sendCodeView];
    
    
    NSLayoutConstraint *textFieldTop = [NSLayoutConstraint constraintWithItem:sendCodeView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:60];
    
    NSLayoutConstraint *textFieldLeft = [NSLayoutConstraint constraintWithItem:sendCodeView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
    
    NSLayoutConstraint *textFieldRight = [NSLayoutConstraint constraintWithItem:sendCodeView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
    
    NSLayoutConstraint *textFieldHeight = [NSLayoutConstraint constraintWithItem:sendCodeView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:202];
    
    [self.view addConstraints:@[textFieldTop,textFieldLeft,textFieldRight,textFieldHeight]];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
